You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor Code To Support Console Interactions
The solution has undergone extensive changes to support an improved console interaction model. A set of files (DataTransferObjectMakeCommand.php, RequestMakeCommand.php, ResourceMakeCommand.php) have had outdated code (InteractsWithConsoleInApplication) replaced with InteractsWithConsole, providing better efficiency. Additionally, these files now include two new methods, beforeCreate() and afterCreate(), to potentially increase the control flow.
Enhanced Placeholder Management
To improve data structure, an adjustment was made to resolvePlaceholders() method across a number of files. Now, instead of its previous return type, it provides an instantiation of the PlaceholderData class, contributing to code readability and ease of data manipulation.
File Movement and Deletion
In an effort to maintain a cleaner codebase, the file ProviderMakeCommand.php was relocated from src/Commands/Infrastructure/ to src/Commands/Application/. Similarly, provider.stub was moved from stubs/infrastructure/ to stubs/application/. Moreover, the file InteractsWithConsoleInApplication.php was deleted due to its redundancy.
Unit Test Modifications
A brand-new test file was introduced (ProviderMakeCommandTest.php), providing wider test coverage. Other test files (DataTransferObjectMakeCommandTest.php, RequestMakeCommandTest.php and ResourceMakeCommandTest.php) underwent changes in their internal logic and file system interactions for improved accuracy and simplicity. Changes include replacing standard 'File' and 'Artisan' interactions with custom function calls like fileExists() and fileGet(), or properly scoped Artisan calls.
This pull request aims to improve the overall integrity of the code, reduce redundancy, simplify testing and enhance maintainability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#95